<div class="row ">
  <div class="col-sm-3 ">
    <%= form_for @user do |f| %>
      <div class="form-group ">
        <%= f.text_field :username, class: "form-control", placeholder: "标题" %>
      </div>

      <div class="form-group">
        <%= f.password_field :password, class: "form-control", placeholder: "内容" %>
      </div>
      <%= f.submit "保存", class: "btn btn-primary" %>
      <div class="dropdown pull-right">
        <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" id="dropdownMenu1">  KKK
          <span class="caret"></span>
        </button>
        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
          <li role="presentation">
            <a role="menuitem" tabindex="-1" href="#">Java</a>
          </li>
          <li role="presentation">2</li>
          <li role="presentation">3</li>
        </ul>
      </div>
    </div>
    <% end %>
</div>
===
<%= form_for :user do |f| %>
<%= form_for :user, url: users_path do |f| %>
  <p>
    <%= f.label :name %>
    <%= f.text_field :name %>
  </p>

  <p>
    <%= f.label :password %>
    <%= f.text_area :password %>
  </p>

  <p>
    <%= f.submit %>
  </p>
<% end %>

